This repository was archived by the owner on Oct 18, 2020. It is now read-only.
This change uses tensorflow directly#31
Open
aliakbarhamzeh1378 wants to merge 1 commit intoRedaOps:masterfrom
aliakbarhamzeh1378:master
Open
This change uses tensorflow directly#31aliakbarhamzeh1378 wants to merge 1 commit intoRedaOps:masterfrom aliakbarhamzeh1378:master
aliakbarhamzeh1378 wants to merge 1 commit intoRedaOps:masterfrom
aliakbarhamzeh1378:master
Conversation
mmphego
reviewed
Feb 29, 2020
| if layer == model.layers[0]: | ||
| input_layer = int(str(layer.input_shape).split(",")[1][1:-1]) | ||
| hidden_layers_nr += 1 | ||
| if type(layer) == Dense: |
There was a problem hiding this comment.
Perhaps, rewrite this as:
Suggested change
| if type(layer) == Dense: | |
| if isinstance(Dense, layer): |
Comment on lines
+48
to
+56
| if type(layer) == Conv2D: | ||
| layer_types.append("Conv2D") | ||
| elif type(layer) == MaxPooling2D: | ||
| layer_types.append("MaxPooling2D") | ||
| elif type(layer) == Dropout: | ||
| layer_types.append("Dropout") | ||
| elif type(layer) == Flatten: | ||
| layer_types.append("Flatten") | ||
| elif type(layer) == Activation: |
| input_layer = int(str(layer.input_shape).split(",")[1][1:-1]) | ||
| hidden_layers_nr += 1 | ||
| if type(layer) == Dense: | ||
| hidden_layers.append(int(str(layer.output_shape).split(",")[1][1:-1])) |
There was a problem hiding this comment.
This is a bit complex for noobs to read, would be nice to simplify it.
Comment on lines
+68
to
+77
| if (type(layer) == Conv2D): | ||
| layer_types.append("Conv2D") | ||
| elif (type(layer) == MaxPooling2D): | ||
| layer_types.append("MaxPooling2D") | ||
| elif (type(layer) == Dropout): | ||
| layer_types.append("Dropout") | ||
| elif (type(layer) == Flatten): | ||
| layer_types.append("Flatten") | ||
| elif (type(layer) == Activation): | ||
| layer_types.append("Activation") |
There was a problem hiding this comment.
endolith
referenced
this pull request
in endolith/ann-visualizer
Apr 3, 2022
endolith
referenced
this pull request
in endolith/ann-visualizer
Apr 3, 2022
endolith
referenced
this pull request
in endolith/ann-visualizer
Apr 3, 2022
Unpythonic C-like syntax, like the semicolons at the end of each line
endolith
referenced
this pull request
in endolith/ann-visualizer
Apr 3, 2022
(but not all the "line too long" ones)
endolith
referenced
this pull request
in endolith/ann-visualizer
Apr 3, 2022
Maybe Keras returned only strings in an earlier version?
endolith
added a commit
to endolith/ann-visualizer
that referenced
this pull request
Apr 3, 2022
These were suggested in RedaOps#31 by @mmphego to support inheritance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I had trouble using the previous code by TensorFlow and the code could not correctly identify the layers so it didn't work